<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>身份证审核信息</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
        function  editStatus(id,status) {
			var id = id;
			$.ajax({
				url : "${ctx}/sys/tbUserVerify/edit",
				async : false,
				type : "post",
				data : {
					"id" : id,
					"auditorState" : status,
				},
				success : function(data) {
					if(data.auditorState==1){
						var id = data.id;
						$("#"+id+"").html("审核通过");
					}else if(data.auditorState==2){
						var id = data.id;
						$("#"+id+"").html("审核不通过");
					}
				}
			});
		}
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="#">身份证审核信息</a></li>
		<%--<shiro:hasPermission name="sys:user:edit"><li><a href="${ctx}/sys/tbUserVerify/form">身份证审核添加</a></li></shiro:hasPermission>--%>
	</ul>
	<form:form id="searchForm" modelAttribute="tbUserVerify" action="${ctx}/sys/tbUserVerify/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<%--<ul class="ul-form">
			<li>	<label>手机：</label><form:input path="name" htmlEscape="false" maxlength="50" class="input-medium"/></li>
			<li><label>审核状态：</label>
				<select id="box" name="auditorState" class="input-medium">
					<option value="-1">全部</option>
						<option  value="0" <c:if test="${tbUserVerify.auditorState=='0'}">selected</c:if> >审核中</option>
						<option  value="1" <c:if test="${tbUserVerify.auditorState=='1'}">selected</c:if>>通过</option>
						<option  value="2" <c:if test="${tbUserVerify.auditorState=='2'}">selected</c:if>>未通过</option>
				</select>
			</li>
			<li><label>日期范围：&nbsp;</label>
				<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-mini Wdate" value="${tbuserverify.beginDate}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
				--&nbsp;<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-mini Wdate"
							   value="${tbuserverify.endDate}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>&nbsp;&nbsp;
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>--%>
	</form:form>
	<sys:message content="${message}"/>
	<span><font style="color: #00A6C7">${mess}</font></span>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>联系人</th>
				<th>手机号</th>
					<th>身份证正面</th>
				<th>身份证反面</th>
				<th>审核状态</th>
				<%--<shiro:hasPermission name="sys:user:edit"><th>操作</th></shiro:hasPermission>--%>
			</tr>
		</thead>
		<tbody>
		<%--<c:forEach items="${page.list}" var="tbUserVerify">--%>
			<tr>
				<td>${uname}</td>
				<td>${mobile}</td>
					<%--<td>${tbUserVerify.logName}</td>--%>
				<td><a href="${tbUserVerify.idCardFrontUrl}" target="_blank">
					<img style="width:100px; height: 85px; border: 0px;" src="${tbUserVerify.idCardFrontUrl}">
				</a></td>
				<td><a href="${tbUserVerify.idCardBackUrl}" target="_blank">
					<img style="width:100px; height: 85px; border: 0px;" src="${tbUserVerify.idCardBackUrl}">
				</a>
				</td>
				<c:if test="${tbUserVerify.auditorState==0}">
					<td >
						<div id="${tbUserVerify.id}">
							<a onclick="editStatus(${tbUserVerify.id},1)">通过 </a><br/><br/><br/>
							<a onclick="editStatus(${tbUserVerify.id},2)">不通过</a>
						</div>
					</td>
				</c:if>
				<c:if test="${tbUserVerify.auditorState==1}"><td >通过</td></c:if>
				<c:if test="${tbUserVerify.auditorState==2}"><td>不通过</td></c:if>
				<%--<shiro:hasPermission name="sys:user:edit"><td>--%>
    				<%--<a href="${ctx}/sys/tbUserVerify/form?id=${tbUserVerify.id}">修改</a>--%>
					<%--<a href="${ctx}/sys/tbUserVerify/delete?id=${tbUserVerify.id}" onclick="return confirmx('确认要删除该身份证审核吗？', this.href)">删除</a>--%>
				<%--</td></shiro:hasPermission>--%>
			</tr>
	<%--	</c:forEach>--%>
		</tbody>
	</table>
	<%--<div class="pagination">${page}</div>--%>
	<div align="right" class="form-actions">
		<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
	</div>
</body>
</html>